<%@page import="com.ericsson.mna.model.bs.UserRegisterServices,java.util.*,com.ericsson.mna.model.pojo.*"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%session=request.getSession(false);
  if(null==session.getAttribute("userId"))
  {
	  response.sendRedirect("login.jsp");
  }
  else
  {
%>
<html>
<head>
<link rel="stylesheet" type="text/css" href="../resources/stylesheets/commonStyle.css">
</head>
<body>
<%
	Properties prop=new Properties();
	prop.load(getServletContext().getResourceAsStream("/view/resources/prop/DbConf.properties"));
	DBConf dbconf=new DBConf();
	dbconf.setDriverName(prop.getProperty("driverName"));
	dbconf.setPassword(prop.getProperty("password"));
	dbconf.setUrl(prop.getProperty("url"));
	dbconf.setUserName(prop.getProperty("userName"));
	String usrId=session.getAttribute("userId").toString();
    UserRegisterServices urs=new UserRegisterServices(dbconf);
	if(urs.getRole(session.getAttribute("userId").toString())==1)
	{
%>
		 <%@ include file="header_mgr.jsp" %> 
	
	<% }
	else
	{
	   %> <%@ include file="header_emp.jsp" %>
<% 	}
	
	}

  %>

<%-- <div id="header" >
<h1>Project Management System  <img src="../resources/image/Ericsson_logo.png" style="height:60px;width:60px"  align="right"> </h1>
<div style="text-align:left">
Welcome <%= session.getAttribute("userId") %>
<div style="text-align:right">
<a  href="logoutAction.do">Logout</a>
</div>
</div>
<hr>
</div>
<div>
<table border="1" style="width:100%">
<tr>
<td><a href="user.jsp">CREATE USER</a></td>
<td><a href="assignTask.jsp">ASSIGN TASK</a></td>
<td> <a href="uploadbulkTask.jsp">UPLOAD BULK TASK</a></td>
<form name="submitForm" action="taskAction.do" method="post">
<td><a href="javascript:document.submitForm.submit()">VIEW TASK</a></td>
 <input type="hidden" name="pageName" value="viewTask">
</form>
<form name="submitForm1" action="taskAction.do" method="post">
<td><a href="javascript:document.submitForm1.submit()">VIEW TASK STATUS</a></td>
 <input type="hidden" name="pageName" value="viewTaskStatus">
</form>
</tr>
</table>
</div> --%>

</body>
</html>